package com.example.my_mqtt;

import com.example.my_mqtt.netty.BootNettyMqttServerThread;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class BootNettyMqttApplication implements CommandLineRunner {

    public static void main(String[] args) {
        System.out.println(666);
        SpringApplication.run(BootNettyMqttApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        // 启动  1883
        int port = 8888;
        BootNettyMqttServerThread bootNettyMqttServerThread = new BootNettyMqttServerThread(port);
        bootNettyMqttServerThread.start();
    }
}
